import VueRouter from 'vue-router';

import shouye from '../../components/index/shouye.vue'
import index from '../../components/index/index.vue'
import book from '../../components/index/book.vue'
import my from '../../components/index/my.vue'
import type from '../../components/index/type.vue'
import details from '../../components/apart/details.vue'
import list from '../../components/index/list.vue'
import search from '../../components/index/search.vue'

export default new VueRouter({
    routes:[
        {
            path:'/index',
            component:index,
            children:[
                {
                    path:'/shouye',
                    component:shouye
                },
                {
                    path:'/type',
                    component:type,
                }
                ,
                {
                    path:'/my',
                    component:my
                },
                {
                    path:'/book',
                    component:book
                }
            ] ,
            redirect:'/shouye'   
        },
        {
            path:'/list',
            component:list
        },
        {
            path:'/search',
            component:search
        },
        {
            path:'/details',
            name:'d',
            component:details
        },
       
        {
            path:'/*',
            redirect:'/shouye'
        }
    ]
})
